package com.ruoyi.core.vo;

import com.ruoyi.core.domain.SegmentTimeUnit;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

public class BatchClientUserCreateOperationVO {

    @NotNull(message = "客户端账户创建类型 operationType 字段不能为空")
    private OperationType operationType;

    /**
     * 单个创建时  username,password, expireTime
     */
    private String username;

    private String password;


    /**
     * 时效片段
     */
    @NotNull(message = "批量客户端用户时效 segment 字段不能为空")
    private Long segment;

    /**
     * 时效单位
     */
    private SegmentTimeUnit timeUnit = SegmentTimeUnit.DAY;

    @NotNull(message = "客户端账户 可操作产品 productIds 字段不能为空")
    @Size(min = 1, message = "客户端账户 可操作产品 productIds 字段不能为空集合")
    private List<Long> productIds;

    /**
     * 批量创建用户个数
     */
    private Long batchUser;

    private List<Long> codeIds;

    private String remark;

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<Long> getCodeIds() {
        return codeIds;
    }

    public void setCodeIds(List<Long> codeIds) {
        this.codeIds = codeIds;
    }

    public OperationType getOperationType() {
        return operationType;
    }

    public void setOperationType(OperationType operationType) {
        this.operationType = operationType;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


    public List<Long> getProductIds() {
        return productIds;
    }

    public void setProductIds(List<Long> productIds) {
        this.productIds = productIds;
    }

    public Long getBatchUser() {
        return batchUser;
    }

    public void setBatchUser(Long batchUser) {
        this.batchUser = batchUser;
    }

    public enum OperationType {
        SINGLE, BATCH
    }

    public Long getSegment() {
        return segment;
    }

    public void setSegment(Long segment) {
        this.segment = segment;
    }

    public SegmentTimeUnit getTimeUnit() {
        return timeUnit;
    }

    public void setTimeUnit(SegmentTimeUnit timeUnit) {
        this.timeUnit = timeUnit;
    }
}
